package com.yhq.yhqproject.base.modules.board.web;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.yhq.yhqproject.base.common.web.ListByPageResp;
import com.yhq.yhqproject.base.modules.board.entity.TemplateHistory;
import com.yhq.yhqproject.base.modules.board.entity.dto.ListLogReq;
import com.yhq.yhqproject.base.modules.board.service.TemplateHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "模板日志")
@ApiSort(101)
@RestController
@RequestMapping("/api/ai/history")
public class TemplateHistoryController {
    @Resource
    private TemplateHistoryService historyService;

    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "枚举")
    @PostMapping("/list")
    public ListByPageResp<TemplateHistory> list(@RequestBody ListLogReq req) {
        return historyService.list(req);
    }

}
